ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArSamplesMon
src
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
7
#include "
LArSamplesMon/LArCellsEmptyMonitoring.h
"
8
#include <vector>
9
#include <string>
10
#include <iostream>
11
12
#include "TROOT.h"
13
#include "TApplication.h"
14
#include "TSystem.h"
15
#include "
CxxUtils/checker_macros.h
"
16
17
#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
18
#include "Cintex/Cintex.h"
19
#endif
20
21
using namespace
LArSamples
;
22
using 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
55
void
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
73
LArSamples::LArCellsEmptyMonitoring
* lce =
new
LArSamples::LArCellsEmptyMonitoring
();
74
75
lce->
SetSelectRecurringBadCells
();
76
lce->
SetSaveRootFile
(0);
77
lce->
SetSaveTextFile
(1);
78
lce->
SetAlgo
(2);
79
lce->
SetLumiblockRange
();
80
lce->
SetBadLBRemovalOption
(0);
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
}
LArCellsEmptyMonitoring.h
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
LArSamples::LArCellsEmptyMonitoring
@Basic class aimed at running simple LAr monitoring function on ntuples produced from that very same ...
Definition
LArCellsEmptyMonitoring.h:24
LArSamples::LArCellsEmptyMonitoring::SetNoiseNsigma
void SetNoiseNsigma(double nsig=10.)
Definition
LArCellsEmptyMonitoring.h:64
LArSamples::LArCellsEmptyMonitoring::SetSaveTextFile
void SetSaveTextFile(bool flag=false)
Definition
LArCellsEmptyMonitoring.h:53
LArSamples::LArCellsEmptyMonitoring::SetAlgo
void SetAlgo(int algoindex=2)
Definition
LArCellsEmptyMonitoring.h:55
LArSamples::LArCellsEmptyMonitoring::Run
void Run(const TString &inputfile)
Definition
LArCellsEmptyMonitoring.cxx:421
LArSamples::LArCellsEmptyMonitoring::SetBadLBRemovalOption
void SetBadLBRemovalOption(bool removeLB=true)
Definition
LArCellsEmptyMonitoring.h:62
LArSamples::LArCellsEmptyMonitoring::SetSelectRecurringBadCells
void SetSelectRecurringBadCells(bool flag=false)
Definition
LArCellsEmptyMonitoring.h:54
LArSamples::LArCellsEmptyMonitoring::SetLumiblockRange
void SetLumiblockRange(bool inputRange=false, int input_lbmin=0, int input_lbmax=0)
Definition
LArCellsEmptyMonitoring.h:57
LArSamples::LArCellsEmptyMonitoring::SetQthreshold
void SetQthreshold(int qvalue=4000)
Definition
LArCellsEmptyMonitoring.h:63
LArSamples::LArCellsEmptyMonitoring::ReadDefectLBList
void ReadDefectLBList(bool ReadList, const TString &LBfile)
Definition
LArCellsEmptyMonitoring.cxx:1431
LArSamples::LArCellsEmptyMonitoring::SetEnergyCountThresholds
void SetEnergyCountThresholds(double ecut=1., int counts1=250, double enecell1=1.5, int counts2=25, double enecell2=30)
Definition
LArCellsEmptyMonitoring.h:65
LArSamples::LArCellsEmptyMonitoring::SetSaveRootFile
void SetSaveRootFile(bool flag=false)
Definition
LArCellsEmptyMonitoring.h:51
LArSamples
Definition
AbsShape.h:24
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0