This file is indexed.

/usr/include/root/RooAbsDataStore.h is in libroot-roofit-dev 5.34.00-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooAbsDataStore.h 42950 2012-02-09 21:21:53Z wouter $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_ABS_DATA_STORE
#define ROO_ABS_DATA_STORE

#include "Rtypes.h"
#include "RooArgSet.h" 
#include "RooAbsData.h"
#include "TNamed.h"
#include <list>


class RooAbsArg ;
class RooArgList ;
class TIterator ;
class TTree ;

class RooAbsDataStore : public TNamed, public RooPrintable {
public:

  RooAbsDataStore() ; 
  RooAbsDataStore(const char* name, const char* title, const RooArgSet& vars) ; 
  RooAbsDataStore(const RooAbsDataStore& other, const char* newname=0) ; 
  RooAbsDataStore(const RooAbsDataStore& other, const RooArgSet& vars, const char* newname=0) ; 
  virtual RooAbsDataStore* clone(const char* newname=0) const = 0 ;
  virtual RooAbsDataStore* clone(const RooArgSet& vars, const char* newname=0) const = 0 ;
  virtual ~RooAbsDataStore() ;

  // Write current row
  virtual Int_t fill() = 0 ;
  
  // Retrieve a row
  virtual const RooArgSet* get(Int_t index) const = 0 ;
  virtual const RooArgSet* get() const { return &_vars ; } 
  virtual Double_t weight() const = 0 ;

  virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const = 0 ;
  virtual void weightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorType etype=RooAbsData::Poisson) const = 0 ; 

  virtual Double_t weight(Int_t index) const = 0 ;

  virtual Bool_t isWeighted() const = 0 ;

  // Change observable name
  virtual Bool_t changeObservableName(const char* from, const char* to) =0 ;
  
  // Add one or more columns
  virtual RooAbsArg* addColumn(RooAbsArg& var, Bool_t adjustRange=kTRUE) = 0 ;
  virtual RooArgSet* addColumns(const RooArgList& varList) = 0 ;

  // Merge column-wise
  virtual RooAbsDataStore* merge(const RooArgSet& allvars, std::list<RooAbsDataStore*> dstoreList) = 0 ;

  // Add rows 
  virtual void append(RooAbsDataStore& other)= 0 ;

  // General & bookkeeping methods
  virtual Bool_t valid() const = 0 ;
  virtual Int_t numEntries() const = 0 ;
  virtual Double_t sumEntries() const { return 0 ; } ;
  virtual void reset() = 0 ;

  // Buffer redirection routines used in inside RooAbsOptTestStatistics
  virtual void attachBuffers(const RooArgSet& extObs) = 0 ; 
  virtual void resetBuffers() = 0 ;

  virtual void setExternalWeightArray(Double_t* /*arrayWgt*/, Double_t* /*arrayWgtErrLo*/, Double_t* /*arrayWgtErrHi*/, Double_t* /*arraySumW2*/) {} ;

  // Printing interface (human readable)
  inline virtual void Print(Option_t *options= 0) const {
    // Print contents on stdout
    printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
  }

  virtual void printName(ostream& os) const ;
  virtual void printTitle(ostream& os) const ;
  virtual void printClassName(ostream& os) const ;
  virtual void printArgs(ostream& os) const ;
  virtual void printValue(ostream& os) const ;
  void printMultiline(ostream& os, Int_t content, Bool_t verbose, TString indent) const ;

  virtual Int_t defaultPrintContents(Option_t* opt) const ;
   

  // Constant term  optimizer interface
  virtual void cacheArgs(const RooAbsArg* cacheOwner, RooArgSet& varSet, const RooArgSet* nset=0) = 0 ;
  virtual const RooAbsArg* cacheOwner() = 0 ;
  virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars) = 0 ;
  virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ;
  const RooArgSet& cachedVars() const { return _cachedVars ; }
  virtual void resetCache() = 0 ;
  virtual void recalculateCache(const RooArgSet* /*proj*/, Int_t /*firstEvent*/, Int_t /*lastEvent*/, Int_t /*stepSize*/) {} ;

  virtual void setDirtyProp(Bool_t flag) { _doDirtyProp = flag ; }
  Bool_t dirtyProp() const { return _doDirtyProp ; }

  virtual void checkInit() const {} ;
  
  Bool_t hasFilledCache() const { return _cachedVars.getSize()>0 ; }

  virtual const TTree* tree() const { return 0 ; }
  virtual void dump() {} 

  virtual void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0, const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) = 0 ;

 protected:

  RooArgSet _vars ;
  RooArgSet _cachedVars ;
  TIterator *_iterator;    //! Iterator over dimension variables
  TIterator *_cacheIter ;  //! Iterator over cached variables

  Bool_t _doDirtyProp ;    // Switch do (de)activate dirty state propagation when loading a data point

  ClassDef(RooAbsDataStore,1) // Abstract Data Storage class
};


#endif