ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
dqi::HanApp Class Reference

#include <HanApp.h>

Inheritance diagram for dqi::HanApp:
Collaboration diagram for dqi::HanApp:

Public Member Functions

 HanApp ()
 
 HanApp (const std::string &configName, const std::string &inputName, const std::string &outputName, const std::string &path="")
 
virtual ~HanApp ()
 
virtual int Analyze (const std::string &configName_, const std::string &inputName_, const std::string &outputName_, const std::string &path_="")
 
virtual TFile * OpenResultsFile () const
 

Protected Attributes

std::string m_outputName
 

Detailed Description

Definition at line 21 of file HanApp.h.

Constructor & Destructor Documentation

◆ HanApp() [1/2]

dqi::HanApp::HanApp ( )

Definition at line 64 of file HanApp.cxx.

66  : m_outputName("")
67 {
68 }

◆ HanApp() [2/2]

dqi::HanApp::HanApp ( const std::string &  configName,
const std::string &  inputName,
const std::string &  outputName,
const std::string &  path = "" 
)

Definition at line 71 of file HanApp.cxx.

73 {
74  HanApp::Analyze( configName, inputName, outputName, path );
75 }

◆ ~HanApp()

dqi::HanApp::~HanApp ( )
virtual

Definition at line 78 of file HanApp.cxx.

80 {
81 }

Member Function Documentation

◆ Analyze()

int dqi::HanApp::Analyze ( const std::string &  configName_,
const std::string &  inputName_,
const std::string &  outputName_,
const std::string &  path_ = "" 
)
virtual

Definition at line 85 of file HanApp.cxx.

87 {
88  DisableMustClean disabled;
89 
90  auto& runtimeConfig = HanRuntimeConfigSingleton::getInstance();
91  runtimeConfig.setPath( path_ );
92 
94  TSeqCollection *outputList = new TList();
95 
96  m_outputName = outputName_;
97 
98  //dqm_core::InputRootFile input( inputName_ );
99  HanInputRootFile input( inputName_, path_ ); // HanInputRootFile inherits from dqm_core::InputRootFile
100 
101  HanOutput output( outputName_, outputMap, outputList );
102  output.setInput(const_cast<TDirectory*>(input.getBasedir()));
103 
104  dqm_core::LibraryManager::instance().loadLibrary( "libdqm_algorithms.so" );
105  dqm_core::LibraryManager::instance().loadLibrary( "libdqm_summaries.so" );
106 
107  HanConfig config;
108  std::cout << "Reading configuration and input histograms...\n" << std::flush;
109  config.BuildMonitors( configName_, input, output );
110  std::cout << "Preparing output...\n" << std::flush;
111  config.BuildConfigOutput( configName_, input.file(), path_, outputMap, outputList );
112 
113  std::cout << "Analyzing histograms...\n" << std::flush;
114  output.activate();
115  input.activate();
116  output.publishMissingDQPars();
117 
118  std::cout << "Writing output file...\n" << std::flush;
119  output.deactivate(); // essential for the HanOutput object since it writes the output file
120 
121  std::cout << "Deleting objects from memory.\n" << std::flush;
122  RecursivelyDeleteCollection(outputList);
123  delete outputList;
124  delete outputMap;
125  return 0;
126 }

◆ OpenResultsFile()

TFile * dqi::HanApp::OpenResultsFile ( ) const
virtual

Definition at line 130 of file HanApp.cxx.

132 {
133  if( m_outputName == "" )
134  return 0;
135 
136  return TFile::Open( m_outputName.c_str() );
137 }

Member Data Documentation

◆ m_outputName

std::string dqi::HanApp::m_outputName
protected

Definition at line 35 of file HanApp.h.


The documentation for this class was generated from the following files:
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
FullCPAlgorithmsTest_eljob.flush
flush
Definition: FullCPAlgorithmsTest_eljob.py:186
dqi::HanApp::Analyze
virtual int Analyze(const std::string &configName_, const std::string &inputName_, const std::string &outputName_, const std::string &path_="")
Definition: HanApp.cxx:86
dqi::HanApp::m_outputName
std::string m_outputName
Definition: HanApp.h:35
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
SCT_Monitoring::disabled
@ disabled
Definition: SCT_MonitoringNumbers.h:60
merge.output
output
Definition: merge.py:17
lumiFormat.outputName
string outputName
Definition: lumiFormat.py:65
dqi::HanRuntimeConfigSingleton::getInstance
static HanRuntimeConfigSingleton & getInstance()
Definition: HanRuntimeConfigSingleton.cxx:15
config
std::vector< std::string > config
Definition: fbtTestBasics.cxx:74
dqi::HanOutput::DQOutputMap_t
std::map< std::string, TSeqCollection * > DQOutputMap_t
Definition: HanOutput.h:45