17 #include "RecoLuminosity/ROOTSchema/interface/HTMLGenerator.hh"
21 #include "RecoLuminosity/TCPReceiver/interface/LumiStructures.hh"
27 previousRun_(0), firstSectionNumber_(0),
29 bMerge_(0), bWBM_(0), bTransfer_(0),
89 bEtSumOnly_ = bEtSumOnly;
94 if( fileType_ != fileType ){
96 if( (fileType_ !=
"RAW") && (fileType_ !=
"VDM") && (fileType_ !=
"ET") ){
100 if( fileType_ !=
"ET" && bEtSumOnly_ ){
103 if( fileType_ ==
"ET" && !bEtSumOnly_ ){
107 RFWriter_->SetEtSumOnly( bEtSumOnly_ );
108 LumiHTML_->SetEtSumOnly( bEtSumOnly_ );
109 RFMerger_->SetEtSumOnly( bEtSumOnly_ );
110 RFTransfer_->SetEtSumOnly( bEtSumOnly_ );
112 RFWriter_->SetFileType(fileType_);
113 LumiHTML_->SetFileType(fileType_);
114 RFMerger_->SetFileType(fileType_);
115 RFTransfer_->SetFileType(fileType_);
126 if( lsDir_.substr( lsDir_.size() - 1) !=
"/" ){
143 mergeDir_ = mergeDir;
144 if( mergeDir_.substr( mergeDir_.size() - 1) !=
"/" ){
153 bTransfer_ = bTransfer;
168 LumiHTML_->SetOutputDir( webDir );
173 LumiHTML_->SetHistoBins( NBins, XMin, XMax );
188 RFWriter_->SetDate( TimeStampYYYYMMDD( startTime_ ));
189 RFMerger_->SetDate( TimeStampYYYYMMDD( startTime_ ));
192 std::stringstream runDirss;
193 runDirss.str(std::string(
""));
194 dateDir_ = TimeStampYYYYMM( startTime_ ) +
"/";
195 runDirss << std::setw(9) << std::setfill(
'0') << previousRun_ <<
"/";
196 runDir_ = runDirss.str();
198 MakeDir( lsDir_ + dateDir_ + runDir_ , 0775);
199 RFWriter_->SetDir( lsDir_ + dateDir_ + runDir_ );
201 RFMerger_->SetInputDir( lsDir_ + dateDir_ + runDir_ );
202 MakeDir( mergeDir_ + dateDir_ , 0775);
203 RFMerger_->SetOutputDir( mergeDir_ + dateDir_ );
205 LumiHTML_->SetInputDir( lsDir_ + dateDir_ + runDir_ );
206 RFTransfer_->SetInputDir( mergeDir_ + dateDir_ );
210 RFWriter_->OpenFile( lumiSection );
211 RFWriter_->FillTree( lumiSection );
212 RFWriter_->CloseFile();
216 LumiHTML_->CreateWebPage( RFWriter_->GetFileName(), 0 );
223 if( previousRun_ != 0 ){
225 RFMerger_->Merge( previousRun_, firstSectionNumber_ );
228 RFTransfer_->SetFileName( RFMerger_->GetOutputFileName());
229 RFTransfer_->TransferFile();
void SetWebDir(const std::string &webDir)
void SetHistoBins(const int NBins, const double XMin, const double XMax)
void SetLSDir(const std::string &lsDir)
void SetCreateWebPage(const bool bWBM)
void SetFileType(const std::string &fileType)
HCAL_HLX::ROOTFileMerger * RFMerger_
HCAL_HLX::ROOTFileTransfer * RFTransfer_
HCAL_HLX::HTMLGenerator * LumiHTML_
void SetMergeFiles(const bool bMerge)
HCAL_HLX::ROOTFileWriter * RFWriter_
bool ProcessSection(const HCAL_HLX::LUMI_SECTION &lumiSection)
void SetTransferFiles(const bool bTransfer)
void SetEtSumOnly(const bool bEtSumOnly)
void SetMergeDir(const std::string &mergeDir)