ATLAS Offline Software
Loading...
Searching...
No Matches
RunLCE.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5//Dear emacs, this is -*-c++-*-
6
8#include <vector>
9#include <string>
10#include <iostream>
11
12#include "TROOT.h"
13#include "TApplication.h"
14#include "TSystem.h"
16
17#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
18#include "Cintex/Cintex.h"
19#endif
20
21using namespace LArSamples;
22using namespace std;
23
24//void RunLCE(const char* inputFile, const char* outputPath, const char* defectLBs, int minCell, int maxCell);
25
26//int main(int argc, char** argv) {
27//
28// if (argc<3 || (argc>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help")))) {
29// std::cout << "Syntax:" << std::endl;
30// std::cout << "RunLCE.exe inFile outFile <defectLBfile>" << std::endl;
31// return -1;
32// }
33//
34// char* defectsLBFileName=nullptr;
35// if (argc>3)
36// defectsLBFileName=argv[3];
37//
38// TROOT root ("root", "root");
39//#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
40// ROOT::Cintex::Cintex::Enable();
41// #endif
42//
43// gSystem->Load("libLArCafJobsDict.so");
44// gSystem->Load("libLArSamplesMonDict.so");
45//
46// RunLCE(argv[1],argv[2],defectsLBFileName,0,0);
47//
48// return 0;
49//}
50
51
52
53
54
55void RunLCE ATLAS_NOT_THREAD_SAFE (const char* inputFile, const char* defectLBFN)
56{
57
58 // TString workdir = gSystem->Getenv("WORKDIR");
59 // if (workdir == "")
60 // {
61 // TString user = gSystem->Getenv("USER");
62 // workdir = "/tmp/" + user;
63 // }
64 // TString inputFile = workdir + "/sample_" + runNumber + ".root";
65
66 if (gSystem->AccessPathName(inputFile))
67 {
68 cout << "Cannot access file " << inputFile << ", exiting from RunLCE.C" << endl;
69 return;
70 }
71
72 // main object - checks LArIdTranslatorHelper within needs LarIdTree.root in $PWD
74
76 lce->SetSaveRootFile(0);
77 lce->SetSaveTextFile(1);
78 lce->SetAlgo(2);
79 lce->SetLumiblockRange();
81 lce->SetQthreshold();
82 lce->SetNoiseNsigma();
83 lce->SetQthreshold();
84 lce->SetEnergyCountThresholds(1.,50,1,20,10);
85 //lce->SetCellRange(minCell,maxCell);
86
87 // If using ntuples which have had defect / non-ATLAS ready LBs removed at the merging stage, use:
88 if (defectLBFN)
89 lce->ReadDefectLBList(true,defectLBFN);
90
91 // else read in the defect list manually using:
92 // lce->ReadDefectLBList(1,"/tmp/larmon/DQ.list.defects.dat");
93 // lce->ScanOnlids("/afs/cern.ch/user/o/osimard/scratch0/samples_larCellsEmpty_166466_merged.root");
94 printf("==\n");
95 //lce->Run(inputFile,outputPath);
96 lce->Run(inputFile);
97
98 return;
99}
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
@Basic class aimed at running simple LAr monitoring function on ntuples produced from that very same ...
void SetLumiblockRange(bool inputRange=false, int input_lbmin=0, int input_lbmax=0)
void ReadDefectLBList(bool ReadList, const TString &LBfile)
void SetEnergyCountThresholds(double ecut=1., int counts1=250, double enecell1=1.5, int counts2=25, double enecell2=30)
STL namespace.