#include <iostream>
#include <string>
#include <vector>
#include <memory>
#include "TFile.h"
#include "TTree.h"
#include "TList.h"
#include "TKey.h"
#include "TH1.h"
Go to the source code of this file.
Definition at line 260 of file NearlineSummariser.cxx.
262 TList* listOfKeys =
fp->GetListOfKeys();
263 TIter next(listOfKeys);
265 while(( key = (TKey*)next() )){
267 if(thisKeyName == dirName){
272 std::cout <<
"NearlineSummariser: ERROR: " <<
fp->GetName() <<
" doesn't contain a dir: " << dirName <<
std::endl;
QTextStream & endl(QTextStream &s)
Definition at line 279 of file NearlineSummariser.cxx.
286 fp->GetObject(histName.c_str(),
hist);
289 std::cout <<
"NearlineSummariser: ERROR: Failed to get histogram: " << histName <<
"\n";
295 outhist = (TH1*) hist->Clone(newHistName.c_str());
296 outhist->SetDirectory(0);
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 153 of file NearlineSummariser.cxx.
155 std::vector<std::string> vecFileNames;
156 for(
int i=1;i<argc;i++){
158 vecFileNames.push_back(thisFileName);
161 std::vector<NearlineRunPlotSet> VecRunPlotSet;
162 std::vector<std::string> VecPlotNames;
163 VecPlotNames.push_back(
"hped_per_event_chan_0");
164 VecPlotNames.push_back(
"hped_per_event_chan_128");
165 VecPlotNames.push_back(
"hped_per_event_chan_256");
166 VecPlotNames.push_back(
"hped_per_event_chan_384");
167 VecPlotNames.push_back(
"hped_per_event_chan_512");
168 VecPlotNames.push_back(
"hped_per_event_chan_640");
169 VecPlotNames.push_back(
"hped_per_event_chan_768");
170 VecPlotNames.push_back(
"hped_per_event_chan_896");
171 VecPlotNames.push_back(
"hped_per_event_chan_1024");
172 VecPlotNames.push_back(
"hped_per_event_chan_1152");
173 VecPlotNames.push_back(
"hped_per_event_chan_1280");
174 VecPlotNames.push_back(
"hped_per_event_chan_1408");
175 VecPlotNames.push_back(
"hped_per_event_chan_1536");
176 VecPlotNames.push_back(
"hped_per_event_chan_1664");
177 VecPlotNames.push_back(
"hped_per_event_chan_1792");
178 VecPlotNames.push_back(
"hped_per_event_chan_1920");
182 for(
auto thisFileName: vecFileNames){
183 TFile *
fp = TFile::Open(thisFileName.c_str());
191 std::cout <<
"NearlineSummariser: INFO: " 192 << thisRunPlotSet.FileInfo
200 std::cout <<
"NearlineSummariser: INFO: ThisNearlineVersion: " 201 << thisRunPlotSet.FileInfo.ThisNearlineMajorVersion
202 <<
"." << thisRunPlotSet.FileInfo.ThisNearlineMinorVersion
203 <<
" NearlineVersion (Summariser): " 208 for(
auto thisPlotName: VecPlotNames){
229 VecRunPlotSet.push_back(thisRunPlotSet);
236 for(
auto thisRunPlotSet: VecRunPlotSet){
237 std::cout <<
"NearlineSummariser: INFO: " << thisRunPlotSet.FileInfo <<
std::endl;
const int NearlineMajorVersion
const int NearlineMinorVersion
const std::string NearlineInstanceLabel
bool checkFileHasDir(TFile *fp, std::string dirName)
QTextStream & endl(QTextStream &s)
const std::string NearlineInstanceLabel = "nearlineana" |
const int NearlineMajorVersion =0 |
const int NearlineMinorVersion =1 |