Functions | Variables
SimpleIterate.C File Reference

Go to the source code of this file.

Functions

 if (!f)
 
f GetObject ("mytree", mytree)
 
mytree SetBranchAddress ("run",&run)
 
mytree SetBranchAddress ("subrun",&subrun)
 
mytree SetBranchAddress ("par",&par)
 
mytree SetBranchAddress ("nevents",&nevents)
 
mytree SetBranchAddress ("firstsec",&firstsec)
 
mytree SetBranchAddress ("lastsec",&lastsec)
 
mytree SetBranchAddress ("ngoodpix",&ngoodpix)
 
mytree SetBranchAddress ("ngoodfeb",&ngoodfeb)
 
mytree SetBranchAddress ("ngooddcm",&ngooddcm)
 
mytree SetBranchAddress ("ngooddb",&ngooddb)
 
mytree SetBranchAddress ("ngoodmip",&ngoodmip)
 
mytree SetBranchAddress ("ngoodcdb",&ngoodcdb)
 
mytree SetBranchAddress ("nactivefeb",&nactivefeb)
 
mytree SetBranchAddress ("nactivedcm",&nactivedcm)
 
mytree SetBranchAddress ("nactivedb",&nactivedb)
 
mytree SetBranchAddress ("pass_runlen",&pass_runlen)
 
mytree SetBranchAddress ("pass_empty",&pass_empty)
 
mytree SetBranchAddress ("pass_hits",&pass_hits)
 
mytree SetBranchAddress ("pass_db",&pass_db)
 
mytree SetBranchAddress ("pass_time",&pass_time)
 
mytree SetBranchAddress ("pass_all",&pass_all)
 
mytree SetBranchAddress ("setsize",&setsize)
 
mytree SetBranchAddress ("rectimesec",&rectimesec)
 
mytree SetBranchAddress ("setlivetime",&setlivetime)
 
mytree SetBranchAddress ("hitrate",&hitrate)
 
mytree SetBranchAddress ("midhitrate",&midhitrate)
 
mytree SetBranchAddress ("miprate",&miprate)
 
mytree SetBranchAddress ("midmiprate",&midmiprate)
 
mytree SetBranchAddress ("mipratio",&mipratio)
 
mytree SetBranchAddress ("mipasym",&mipasym)
 
mytree SetBranchAddress ("nactivechannels",&nactivechannels)
 
mytree SetBranchAddress ("emptypercentage",&emptypercentage)
 
mytree SetBranchAddress ("dbencoded",&dbencoded)
 
mytree SetBranchAddress ("dbaencoded",&dbaencoded)
 
mytree SetBranchAddress ("pass_reco",&pass_reco)
 
mytree SetBranchAddress ("pass_slc",&pass_slc)
 
mytree SetBranchAddress ("pass_trk",&pass_trk)
 
mytree SetBranchAddress ("corrupted",&corrupted)
 
mytree SetBranchAddress ("procsec",&procsec)
 
mytree SetBranchAddress ("numslc",&numslc)
 
mytree SetBranchAddress ("trkfrac2D",&trkfrac2D)
 
mytree SetBranchAddress ("preliminary",&preliminary)
 
 for (Long64_t i=0;i< nentries;i++)
 

Variables

TFile * f = (TFile*)gROOT->GetListOfFiles()->FindObject("MetricsTree_All.root")
 
TTree * mytree
 
Int_t run
 
Int_t subrun
 
Int_t par
 
Int_t nevents
 
Int_t firstsec
 
Int_t lastsec
 
Int_t ngoodpix
 
Int_t ngoodfeb
 
Int_t ngooddcm
 
Int_t ngooddb
 
Int_t ngoodmip
 
Int_t ngoodcdb
 
Int_t nactivefeb
 
Int_t nactivedcm
 
Int_t nactivedb
 
Int_t pass_runlen
 
Int_t pass_empty
 
Int_t pass_hits
 
Int_t pass_db
 
Int_t pass_time
 
Int_t pass_all
 
Int_t setsize
 
Double_t rectimesec
 
Double_t setlivetime
 
Double_t hitrate
 
Double_t midhitrate
 
Double_t miprate
 
Double_t midmiprate
 
Double_t mipratio
 
Double_t mipasym
 
Double_t nactivechannels
 
Double_t emptypercentage
 
Int_t dbencoded
 
Int_t dbaencoded
 
Int_t pass_reco
 
Int_t pass_slc
 
Int_t pass_trk
 
Int_t corrupted
 
Int_t procsec
 
Double_t numslc
 
Double_t trkfrac2D
 
Int_t preliminary
 
Long64_t nentries = mytree->GetEntries()
 
Long64_t nbytes = 0
 

Function Documentation

for ( )

Definition at line 117 of file SimpleIterate.C.

References om::cout, dbencoded, allTimeWatchdog::endl, and MECModelEnuComparisons::i.

117  {
118  nbytes += mytree->GetEntry(i);
119 
120  //Define here conditions for printing output
121  std::vector<bool> printConditions;
122  printConditions.push_back( bool(i%10000==0) ); //Every 10K rows
123  //printConditions.push_back( bool(i>=1405900 && i<=1407000) ); //Range 1
124  //printConditions.push_back( bool(i>=1407450 && i<=1409000) ); //Range 2
125  printConditions.push_back( bool(i>=1350000 && i<=1360000) ); //Range 2
126 
127  //Compose (logical OR) all the conditions
128  bool jointPrintCondition = 0;
129  for(int k=0; k<printConditions.size();k++)
130  jointPrintCondition = jointPrintCondition || printConditions[k];
131 
132  //Actually print
133  if (jointPrintCondition){
134  std::cout
135  << "Row "
136  << std::setw(7) << i
137  << " : "
138  << std::setw(5) << run
139  << "/"
140  << std::setw(2) << subrun
141  << " GoodDB "
142  << std::setw(2) << ngooddb
143  << " PassAll "
144  << std::setw(1) << pass_all
145  << " Length "
146  << std::setw(4) << lastsec-firstsec
147  << " DBdecoded "
148  << std::setw(14) << std::bitset<14>(dbencoded)
149  << std::endl;
150  }
151 
152  }
Int_t lastsec
Definition: SimpleIterate.C:27
Int_t pass_all
Definition: SimpleIterate.C:42
Int_t ngooddb
Definition: SimpleIterate.C:31
Int_t dbencoded
Definition: SimpleIterate.C:54
Int_t subrun
Definition: SimpleIterate.C:23
TTree * mytree
Definition: SimpleIterate.C:18
Definition: run.py:1
OStream cout
Definition: OStream.cxx:6
Int_t firstsec
Definition: SimpleIterate.C:26
Long64_t nbytes
f GetObject ( "mytree"  ,
mytree   
)

Referenced by Train_CosRej_BDTMLP().

if ( f)

Definition at line 15 of file SimpleIterate.C.

15  {
16  f = new TFile("MetricsTree_All.root");
17  }
TFile * f
Definition: SimpleIterate.C:14
mytree SetBranchAddress ( "run"  ,
run 
)
mytree SetBranchAddress ( "subrun"  ,
subrun 
)
mytree SetBranchAddress ( "par"  ,
par 
)
mytree SetBranchAddress ( "nevents"  ,
nevents 
)
mytree SetBranchAddress ( "firstsec"  ,
firstsec 
)
mytree SetBranchAddress ( "lastsec"  ,
lastsec 
)
mytree SetBranchAddress ( "ngoodpix"  ,
ngoodpix 
)
mytree SetBranchAddress ( "ngoodfeb"  ,
ngoodfeb 
)
mytree SetBranchAddress ( "ngooddcm"  ,
ngooddcm 
)
mytree SetBranchAddress ( "ngooddb"  ,
ngooddb 
)
mytree SetBranchAddress ( "ngoodmip"  ,
ngoodmip 
)
mytree SetBranchAddress ( "ngoodcdb"  ,
ngoodcdb 
)
mytree SetBranchAddress ( "nactivefeb"  ,
nactivefeb 
)
mytree SetBranchAddress ( "nactivedcm"  ,
nactivedcm 
)
mytree SetBranchAddress ( "nactivedb"  ,
nactivedb 
)
mytree SetBranchAddress ( "pass_runlen"  ,
pass_runlen 
)
mytree SetBranchAddress ( "pass_empty"  ,
pass_empty 
)
mytree SetBranchAddress ( "pass_hits"  ,
pass_hits 
)
mytree SetBranchAddress ( "pass_db"  ,
pass_db 
)
mytree SetBranchAddress ( "pass_time"  ,
pass_time 
)
mytree SetBranchAddress ( "pass_all"  ,
pass_all 
)
mytree SetBranchAddress ( "setsize"  ,
setsize 
)
mytree SetBranchAddress ( "rectimesec"  ,
rectimesec 
)
mytree SetBranchAddress ( "setlivetime"  ,
setlivetime 
)
mytree SetBranchAddress ( "hitrate"  ,
hitrate 
)
mytree SetBranchAddress ( "midhitrate"  ,
midhitrate 
)
mytree SetBranchAddress ( "miprate"  ,
miprate 
)
mytree SetBranchAddress ( "midmiprate"  ,
midmiprate 
)
mytree SetBranchAddress ( "mipratio"  ,
mipratio 
)
mytree SetBranchAddress ( "mipasym"  ,
mipasym 
)
mytree SetBranchAddress ( "nactivechannels"  ,
nactivechannels 
)
mytree SetBranchAddress ( "emptypercentage"  ,
emptypercentage 
)
mytree SetBranchAddress ( "dbencoded"  ,
dbencoded 
)
mytree SetBranchAddress ( "dbaencoded"  ,
dbaencoded 
)
mytree SetBranchAddress ( "pass_reco"  ,
pass_reco 
)
mytree SetBranchAddress ( "pass_slc"  ,
pass_slc 
)
mytree SetBranchAddress ( "pass_trk"  ,
pass_trk 
)
mytree SetBranchAddress ( "corrupted"  ,
corrupted 
)
mytree SetBranchAddress ( "procsec"  ,
procsec 
)
mytree SetBranchAddress ( "numslc"  ,
numslc 
)
mytree SetBranchAddress ( "trkfrac2D"  ,
trkfrac2D 
)
mytree SetBranchAddress ( "preliminary"  ,
preliminary 
)

Variable Documentation

Int_t corrupted

Definition at line 59 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), BuildOldTree(), and CleanupTree().

Int_t dbaencoded

Definition at line 55 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), BuildOldTree(), and PlotDB_Web().

Int_t dbencoded
Double_t emptypercentage
TFile* f = (TFile*)gROOT->GetListOfFiles()->FindObject("MetricsTree_All.root")

Definition at line 14 of file SimpleIterate.C.

Int_t firstsec
Double_t hitrate

Definition at line 46 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t lastsec
Double_t midhitrate

Definition at line 47 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Double_t midmiprate
Double_t mipasym

Definition at line 51 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Double_t miprate

Definition at line 48 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Double_t mipratio

Definition at line 50 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

TTree* mytree
Double_t nactivechannels
Int_t nactivedb

Definition at line 36 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t nactivedcm

Definition at line 35 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t nactivefeb

Definition at line 34 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Long64_t nbytes = 0
Long64_t nentries = mytree->GetEntries()
Int_t nevents
Int_t ngoodcdb
Int_t ngooddb

Definition at line 31 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t ngooddcm

Definition at line 30 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t ngoodfeb

Definition at line 29 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t ngoodmip

Definition at line 32 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t ngoodpix

Definition at line 28 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Double_t numslc
Int_t par
Int_t pass_all
Int_t pass_db

Definition at line 40 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t pass_empty
Int_t pass_hits
Int_t pass_reco

Definition at line 56 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t pass_runlen
Int_t pass_slc

Definition at line 57 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t pass_time
Int_t pass_trk

Definition at line 58 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t preliminary
Int_t procsec

Definition at line 60 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Double_t rectimesec

Definition at line 44 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t run

Definition at line 22 of file SimpleIterate.C.

Double_t setlivetime

Definition at line 45 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), BuildOldTree(), and GetHist().

Int_t setsize

Definition at line 43 of file SimpleIterate.C.

Referenced by BuildMetricsTree_OnMon(), and BuildOldTree().

Int_t subrun

Definition at line 23 of file SimpleIterate.C.

Double_t trkfrac2D