CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
edm::PoolOutputModule Class Reference

#include <PoolOutputModule.h>

Inheritance diagram for edm::PoolOutputModule:
edm::OutputModule edm::TimeoutPoolOutputModule

Classes

struct  AuxItem
 
struct  OutputItem
 

Public Types

typedef boost::array< AuxItem,
NumBranchTypes
AuxItemArray
 
enum  DropMetaData { DropNone, DropDroppedPrior, DropPrior, DropAll }
 
typedef std::vector< OutputItemOutputItemList
 
typedef boost::array
< OutputItemList,
NumBranchTypes
OutputItemListArray
 
- Public Types inherited from edm::OutputModule
typedef OutputModule ModuleType
 
typedef OutputWorker WorkerType
 

Public Member Functions

AuxItemArray const & auxItems () const
 
std::string const & basketOrder () const
 
int const & basketSize () const
 
std::string const & catalog () const
 
int const & compressionLevel () const
 
std::string const & currentFileName () const
 
DropMetaData const & dropMetaData () const
 
int const eventAutoFlushSize () const
 
std::string const & fileName () const
 
int const & inputFileCount () const
 
std::string const & logicalFileName () const
 
unsigned int const & maxFileSize () const
 
std::string const & moduleLabel () const
 
bool const & overrideInputFileSplitLevels () const
 
 PoolOutputModule (ParameterSet const &ps)
 
OutputItemListArray const & selectedOutputItemList () const
 
int const & splitLevel () const
 
int const & treeMaxVirtualSize () const
 
int const & whyNotFastClonable () const
 
virtual ~PoolOutputModule ()
 
- Public Member Functions inherited from edm::OutputModule
BranchChildren const & branchChildren () const
 
boost::array< bool,
NumBranchTypes > const & 
hasNewlyDroppedBranch () const
 
SelectionsArray const & keptProducts () const
 
int maxEvents () const
 
 OutputModule (ParameterSet const &pset)
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts ()
 
bool wantAllEvents () const
 
virtual ~OutputModule ()
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::OutputModule
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

virtual bool shouldWeCloseFile () const
 allow inheriting classes to override but still be able to call this method in the overridden version More...
 
virtual void write (EventPrincipal const &e)
 
- Protected Member Functions inherited from edm::OutputModule
CurrentProcessingContext const * currentContext () const
 
ModuleDescription const & description () const
 
void doBeginJob ()
 
bool doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doBeginRun (RunPrincipal const &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doEndRun (RunPrincipal const &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doEvent (EventPrincipal const &ep, EventSetup const &c, CurrentProcessingContext const *cpc)
 
Trig getTriggerResults (Event const &ep) const
 
Trig getTriggerResults (EventPrincipal const &ep) const
 
ParameterSetID selectorConfig () const
 

Private Member Functions

void beginInputFile (FileBlock const &fb)
 
virtual void doOpenFile ()
 
void fillSelectedItemList (BranchType branchtype, TTree *theInputTree)
 
virtual void finishEndFile ()
 
virtual bool isFileOpen () const
 
virtual void openFile (FileBlock const &fb)
 
virtual void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
virtual void respondToCloseInputFile (FileBlock const &fb)
 
virtual void respondToOpenInputFile (FileBlock const &fb)
 
virtual void startEndFile ()
 
virtual void writeBranchIDListRegistry ()
 
virtual void writeFileFormatVersion ()
 
virtual void writeFileIdentifier ()
 
virtual void writeIndexIntoFile ()
 
virtual void writeLuminosityBlock (LuminosityBlockPrincipal const &lb)
 
virtual void writeParameterSetRegistry ()
 
virtual void writeParentageRegistry ()
 
virtual void writeProcessConfigurationRegistry ()
 
virtual void writeProcessHistoryRegistry ()
 
virtual void writeProductDependencies ()
 
virtual void writeProductDescriptionRegistry ()
 
virtual void writeRun (RunPrincipal const &r)
 

Private Attributes

AuxItemArray auxItems_
 
std::string basketOrder_
 
int const basketSize_
 
std::string const catalog_
 
unsigned int childIndex_
 
int const compressionLevel_
 
DropMetaData dropMetaData_
 
int const eventAutoFlushSize_
 
std::string const fileName_
 
bool initializedFromInput_
 
int inputFileCount_
 
std::string const logicalFileName_
 
unsigned int const maxFileSize_
 
std::string const moduleLabel_
 
unsigned int numberOfDigitsInIndex_
 
int outputFileCount_
 
bool overrideInputFileSplitLevels_
 
boost::scoped_ptr< RootOutputFilerootOutputFile_
 
RootServiceChecker rootServiceChecker_
 
OutputItemListArray selectedOutputItemList_
 
int const splitLevel_
 
std::string statusFileName_
 
int const treeMaxVirtualSize_
 
int whyNotFastClonable_
 

Detailed Description

Definition at line 27 of file PoolOutputModule.h.

Member Typedef Documentation

Definition at line 59 of file PoolOutputModule.h.

Definition at line 90 of file PoolOutputModule.h.

Definition at line 92 of file PoolOutputModule.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

edm::PoolOutputModule::PoolOutputModule ( ParameterSet const &  ps)
explicit

Definition at line 27 of file PoolOutputModule.cc.

References edm::errors::Configuration, DropAll, DropDroppedPrior, dropMetaData(), dropMetaData_, DropNone, DropPrior, edm::FileBlock::EventSelectionUsed, edm::hlt::Exception, edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), moduleLabel_, statusFileName_, edm::OutputModule::wantAllEvents(), and whyNotFastClonable_.

27  :
30  auxItems_(),
32  fileName_(pset.getUntrackedParameter<std::string>("fileName")),
33  logicalFileName_(pset.getUntrackedParameter<std::string>("logicalFileName")),
34  catalog_(pset.getUntrackedParameter<std::string>("catalog")),
35  maxFileSize_(pset.getUntrackedParameter<int>("maxSize")),
36  compressionLevel_(pset.getUntrackedParameter<int>("compressionLevel")),
37  basketSize_(pset.getUntrackedParameter<int>("basketSize")),
38  eventAutoFlushSize_(pset.getUntrackedParameter<int>("eventAutoFlushCompressedSize")),
39  splitLevel_(std::min<int>(pset.getUntrackedParameter<int>("splitLevel") + 1, 99)),
40  basketOrder_(pset.getUntrackedParameter<std::string>("sortBaskets")),
41  treeMaxVirtualSize_(pset.getUntrackedParameter<int>("treeMaxVirtualSize")),
42  whyNotFastClonable_(pset.getUntrackedParameter<bool>("fastCloning") ? FileBlock::CanFastClone : FileBlock::DisabledInConfigFile),
44  moduleLabel_(pset.getParameter<std::string>("@module_label")),
45  initializedFromInput_(false),
47  inputFileCount_(0),
48  childIndex_(0U),
50  overrideInputFileSplitLevels_(pset.getUntrackedParameter<bool>("overrideInputFileSplitLevels")),
52  statusFileName_() {
53 
54  if (pset.getUntrackedParameter<bool>("writeStatusFile")) {
55  std::ostringstream statusfilename;
56  statusfilename << moduleLabel_ << '_' << getpid();
57  statusFileName_ = statusfilename.str();
58  }
59 
60  std::string dropMetaData(pset.getUntrackedParameter<std::string>("dropMetaData"));
61  if(dropMetaData.empty()) dropMetaData_ = DropNone;
62  else if(dropMetaData == std::string("NONE")) dropMetaData_ = DropNone;
63  else if(dropMetaData == std::string("DROPPED")) dropMetaData_ = DropDroppedPrior;
64  else if(dropMetaData == std::string("PRIOR")) dropMetaData_ = DropPrior;
65  else if(dropMetaData == std::string("ALL")) dropMetaData_ = DropAll;
66  else {
67  throw edm::Exception(errors::Configuration, "Illegal dropMetaData parameter value: ")
68  << dropMetaData << ".\n"
69  << "Legal values are 'NONE', 'DROPPED', 'PRIOR', and 'ALL'.\n";
70  }
71 
72  if (!wantAllEvents()) {
74  }
75 
76  // We don't use this next parameter, but we read it anyway because it is part
77  // of the configuration of this module. An external parser creates the
78  // configuration by reading this source code.
79  pset.getUntrackedParameterSet("dataset");
80  }
std::string const catalog_
DropMetaData const & dropMetaData() const
std::string const moduleLabel_
boost::scoped_ptr< RootOutputFile > rootOutputFile_
bool wantAllEvents() const
Definition: OutputModule.h:65
OutputItemListArray selectedOutputItemList_
unsigned int numberOfDigitsInIndex_
unsigned int const maxFileSize_
std::string const fileName_
std::string const logicalFileName_
OutputModule(ParameterSet const &pset)
RootServiceChecker rootServiceChecker_
edm::PoolOutputModule::~PoolOutputModule ( )
virtual

Definition at line 219 of file PoolOutputModule.cc.

219  {
220  }

Member Function Documentation

AuxItemArray const& edm::PoolOutputModule::auxItems ( ) const
inline

Definition at line 60 of file PoolOutputModule.h.

References auxItems_.

Referenced by edm::RootOutputFile::RootOutputFile().

60 {return auxItems_;}
std::string const& edm::PoolOutputModule::basketOrder ( ) const
inline

Definition at line 38 of file PoolOutputModule.h.

References basketOrder_.

Referenced by edm::RootOutputFile::beginInputFile().

38 {return basketOrder_;}
int const& edm::PoolOutputModule::basketSize ( ) const
inline
void edm::PoolOutputModule::beginInputFile ( FileBlock const &  fb)
private

Definition at line 176 of file PoolOutputModule.cc.

References isFileOpen(), edm::OutputModule::remainingEvents(), and rootOutputFile_.

Referenced by openFile(), and respondToOpenInputFile().

176  {
177  if(isFileOpen()) {
178  rootOutputFile_->beginInputFile(fb, remainingEvents());
179  }
180  }
virtual bool isFileOpen() const
int remainingEvents() const
Definition: OutputModule.h:50
boost::scoped_ptr< RootOutputFile > rootOutputFile_
std::string const& edm::PoolOutputModule::catalog ( ) const
inline

Definition at line 42 of file PoolOutputModule.h.

References catalog_.

Referenced by edm::RootOutputFile::RootOutputFile().

42 {return catalog_;}
std::string const catalog_
int const& edm::PoolOutputModule::compressionLevel ( ) const
inline

Definition at line 34 of file PoolOutputModule.h.

References compressionLevel_.

34 {return compressionLevel_;}
std::string const & edm::PoolOutputModule::currentFileName ( ) const

Definition at line 82 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by edm::TimeoutPoolOutputModule::shouldWeCloseFile().

82  {
83  return rootOutputFile_->fileName();
84  }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::doOpenFile ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 261 of file PoolOutputModule.cc.

References childIndex_, relativeConstraints::empty, edm::hlt::Exception, fileName(), inputFileCount_, logicalFileName(), edm::errors::LogicError, numberOfDigitsInIndex_, evf::evtn::offset(), outputFileCount_, rootOutputFile_, and createPayload::suffix.

Referenced by openFile().

261  {
262  if(inputFileCount_ == 0) {
264  << "Attempt to open output file before input file. "
265  << "Please report this to the core framework developers.\n";
266  }
267  std::string suffix(".root");
269  bool ext = (offset == fileName().size() - suffix.size());
270  if(!ext) suffix.clear();
271  std::string fileBase(ext ? fileName().substr(0, offset) : fileName());
272  std::ostringstream ofilename;
273  std::ostringstream lfilename;
274  ofilename << fileBase;
275  lfilename << logicalFileName();
277  ofilename << '_' << std::setw(numberOfDigitsInIndex_) << std::setfill('0') << childIndex_;
278  if(!logicalFileName().empty()) {
279  lfilename << '_' << std::setw(numberOfDigitsInIndex_) << std::setfill('0') << childIndex_;
280  }
281  }
282  if(outputFileCount_) {
283  ofilename << std::setw(3) << std::setfill('0') << outputFileCount_;
284  if(!logicalFileName().empty()) {
285  lfilename << std::setw(3) << std::setfill('0') << outputFileCount_;
286  }
287  }
288  ofilename << suffix;
289  rootOutputFile_.reset(new RootOutputFile(this, ofilename.str(), lfilename.str()));
291  }
std::string const & fileName() const
uint16_t size_type
std::string const & logicalFileName() const
boost::scoped_ptr< RootOutputFile > rootOutputFile_
unsigned int offset(bool)
unsigned int numberOfDigitsInIndex_
DropMetaData const& edm::PoolOutputModule::dropMetaData ( ) const
inline
int const edm::PoolOutputModule::eventAutoFlushSize ( ) const
inline

Definition at line 36 of file PoolOutputModule.h.

References eventAutoFlushSize_.

Referenced by edm::RootOutputFile::RootOutputFile().

36 {return eventAutoFlushSize_;}
std::string const& edm::PoolOutputModule::fileName ( ) const
inline

Definition at line 32 of file PoolOutputModule.h.

References fileName_.

Referenced by doOpenFile().

32 {return fileName_;}
std::string const fileName_
void edm::PoolOutputModule::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 294 of file PoolOutputModule.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), edm::OutputModule::fillDescription(), edm::ParameterSetDescription::setAllowAnything(), and edm::ParameterSetDescription::setComment().

294  {
295  std::string defaultString;
297  desc.setComment("Writes runs, lumis, and events into EDM/ROOT files.");
298  desc.addUntracked<std::string>("fileName")
299  ->setComment("Name of output file.");
300  desc.addUntracked<std::string>("logicalFileName", defaultString)
301  ->setComment("Passed to job report. Otherwise unused by module.");
302  desc.addUntracked<std::string>("catalog", defaultString)
303  ->setComment("Passed to job report. Otherwise unused by module.");
304  desc.addUntracked<int>("maxSize", 0x7f000000)
305  ->setComment("Maximum output file size, in kB.\n"
306  "If over maximum, new output file will be started at next input file transition.");
307  desc.addUntracked<int>("compressionLevel", 7)
308  ->setComment("ROOT compression level of output file.");
309  desc.addUntracked<int>("basketSize", 16384)
310  ->setComment("Default ROOT basket size in output file.");
311  desc.addUntracked<int>("eventAutoFlushCompressedSize",-1)->setComment("Set ROOT auto flush stored data size (in bytes) for event TTree. The value sets how large the compressed buffer is allowed to get. The uncompressed buffer can be quite a bit larger than this depending on the average compression ratio. The value of -1 just uses ROOT's default value. The value of 0 turns off this feature.");
312  desc.addUntracked<int>("splitLevel", 99)
313  ->setComment("Default ROOT branch split level in output file.");
314  desc.addUntracked<std::string>("sortBaskets", std::string("sortbasketsbyoffset"))
315  ->setComment("Legal values: 'sortbasketsbyoffset', 'sortbasketsbybranch', 'sortbasketsbyentry'.\n"
316  "Used by ROOT when fast copying. Affects performance.");
317  desc.addUntracked<int>("treeMaxVirtualSize", -1)
318  ->setComment("Size of ROOT TTree TBasket cache. Affects performance.");
319  desc.addUntracked<bool>("fastCloning", true)
320  ->setComment("True: Allow fast copying, if possible.\n"
321  "False: Disable fast copying.");
322  desc.addUntracked<bool>("overrideInputFileSplitLevels", false)
323  ->setComment("False: Use branch split levels and basket sizes from input file, if possible.\n"
324  "True: Always use specified or default split levels and basket sizes.");
325  desc.addUntracked<bool>("writeStatusFile", false)
326  ->setComment("Write a status file. Intended for use by workflow management.");
327  desc.addUntracked<std::string>("dropMetaData", defaultString)
328  ->setComment("Determines handling of per product per event metadata. Options are:\n"
329  "'NONE': Keep all of it.\n"
330  "'DROPPED': Keep it for products produced in current process and all kept products. Drop it for dropped products produced in prior processes.\n"
331  "'PRIOR': Keep it for products produced in current process. Drop it for products produced in prior processes.\n"
332  "'ALL': Drop all of it.");
333  ParameterSetDescription dataSet;
334  dataSet.setAllowAnything();
335  desc.addUntracked<ParameterSetDescription>("dataset", dataSet)
336  ->setComment("PSet is only used by Data Operations and not by this module.");
337 
339 
340  descriptions.add("edmOutput", desc);
341  }
static void fillDescription(ParameterSetDescription &desc)
void edm::PoolOutputModule::fillSelectedItemList ( BranchType  branchtype,
TTree *  theInputTree 
)
private

Definition at line 135 of file PoolOutputModule.cc.

References auxItems_, basketSize(), edm::BranchDescription::basketSize(), edm::PoolOutputModule::AuxItem::basketSize_, edm::PoolOutputModule::OutputItem::basketSize_, Selections::begin(), edm::BranchDescription::branchName(), revisionDML::branchType(), edm::BranchTypeToAuxiliaryBranchName(), Selections::end(), edm::BranchDescription::invalidBasketSize, edm::BranchDescription::invalidSplitLevel, edm::OutputModule::keptProducts(), edm::PoolOutputModule::OutputItem::OutputItem(), overrideInputFileSplitLevels_, parseEventContent::prod, edm::BranchDescription::produced(), selectedOutputItemList_, edm::sort_all(), splitLevel(), edm::BranchDescription::splitLevel(), and edm::PoolOutputModule::OutputItem::splitLevel_.

Referenced by respondToOpenInputFile().

135  {
136 
137  Selections const& keptVector = keptProducts()[branchType];
139  AuxItem& auxItem = auxItems_[branchType];
140 
141  // Fill AuxItem
142  if (theInputTree != 0 && !overrideInputFileSplitLevels_) {
143  TBranch* auxBranch = theInputTree->GetBranch(BranchTypeToAuxiliaryBranchName(branchType).c_str());
144  if (auxBranch) {
145  auxItem.basketSize_ = auxBranch->GetBasketSize();
146  } else {
147  auxItem.basketSize_ = basketSize_;
148  }
149  } else {
150  auxItem.basketSize_ = basketSize_;
151  }
152 
153  // Fill outputItemList with an entry for each branch.
154  for(Selections::const_iterator it = keptVector.begin(), itEnd = keptVector.end(); it != itEnd; ++it) {
157 
158  BranchDescription const& prod = **it;
159  TBranch* theBranch = ((!prod.produced() && theInputTree != 0 && !overrideInputFileSplitLevels_) ? theInputTree->GetBranch(prod.branchName().c_str()) : 0);
160 
161  if(theBranch != 0) {
162  splitLevel = theBranch->GetSplitLevel();
163  basketSize = theBranch->GetBasketSize();
164  } else {
165  splitLevel = (prod.splitLevel() == BranchDescription::invalidSplitLevel ? splitLevel_ : prod.splitLevel());
166  basketSize = (prod.basketSize() == BranchDescription::invalidBasketSize ? basketSize_ : prod.basketSize());
167  }
168  outputItemList.push_back(OutputItem(&prod, splitLevel, basketSize));
169  }
170 
171  // Sort outputItemList to allow fast copying.
172  // The branches in outputItemList must be in the same order as in the input tree, with all new branches at the end.
173  sort_all(outputItemList, OutputItem::Sorter(theInputTree));
174  }
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:108
int const & basketSize() const
SelectionsArray const & keptProducts() const
Definition: OutputModule.h:56
static int const invalidSplitLevel
static int const invalidBasketSize
std::vector< OutputItem > OutputItemList
OutputItemListArray selectedOutputItemList_
iterator end()
Definition: Selections.h:367
int const & splitLevel() const
iterator begin()
Definition: Selections.h:366
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
void edm::PoolOutputModule::finishEndFile ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 257 of file PoolOutputModule.cc.

References rootOutputFile_.

257 { rootOutputFile_->finishEndFile(); rootOutputFile_.reset(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
int const& edm::PoolOutputModule::inputFileCount ( ) const
inline

Definition at line 45 of file PoolOutputModule.h.

References inputFileCount_.

Referenced by edm::RootOutputFile::beginInputFile().

bool edm::PoolOutputModule::isFileOpen ( ) const
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 258 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by beginInputFile(), and openFile().

258 { return rootOutputFile_.get() != 0; }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
std::string const& edm::PoolOutputModule::logicalFileName ( ) const
inline

Definition at line 33 of file PoolOutputModule.h.

References logicalFileName_.

Referenced by doOpenFile().

33 {return logicalFileName_;}
std::string const logicalFileName_
unsigned int const& edm::PoolOutputModule::maxFileSize ( ) const
inline

Definition at line 44 of file PoolOutputModule.h.

References maxFileSize_.

Referenced by edm::RootOutputFile::shouldWeCloseFile().

44 {return maxFileSize_;}
unsigned int const maxFileSize_
std::string const& edm::PoolOutputModule::moduleLabel ( ) const
inline

Definition at line 43 of file PoolOutputModule.h.

References moduleLabel_.

Referenced by edm::RootOutputFile::RootOutputFile().

43 {return moduleLabel_;}
std::string const moduleLabel_
void edm::PoolOutputModule::openFile ( FileBlock const &  fb)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 182 of file PoolOutputModule.cc.

References beginInputFile(), doOpenFile(), and isFileOpen().

182  {
183  if(!isFileOpen()) {
184  doOpenFile();
186  }
187  }
virtual bool isFileOpen() const
void beginInputFile(FileBlock const &fb)
bool const& edm::PoolOutputModule::overrideInputFileSplitLevels ( ) const
inline
void edm::PoolOutputModule::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 208 of file PoolOutputModule.cc.

References childIndex_, and numberOfDigitsInIndex_.

208  {
209  childIndex_ = iChildIndex;
210  while (iNumberOfChildren != 0) {
212  iNumberOfChildren /= 10;
213  }
214  if (numberOfDigitsInIndex_ == 0) {
215  numberOfDigitsInIndex_ = 3; // Protect against zero iNumberOfChildren
216  }
217  }
unsigned int numberOfDigitsInIndex_
void edm::PoolOutputModule::respondToCloseInputFile ( FileBlock const &  fb)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 204 of file PoolOutputModule.cc.

References rootOutputFile_.

204  {
205  if(rootOutputFile_) rootOutputFile_->respondToCloseInputFile(fb);
206  }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::respondToOpenInputFile ( FileBlock const &  fb)
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 189 of file PoolOutputModule.cc.

References beginInputFile(), revisionDML::branchType(), fillSelectedItemList(), i, edm::InEvent, initializedFromInput_, edm::InLumi, inputFileCount_, edm::FileBlock::lumiTree(), edm::NumBranchTypes, edm::FileBlock::runTree(), and edm::FileBlock::tree().

189  {
190  if(!initializedFromInput_) {
191  for(int i = InEvent; i < NumBranchTypes; ++i) {
192  BranchType branchType = static_cast<BranchType>(i);
193  TTree* theInputTree = (branchType == InEvent ? fb.tree() :
194  (branchType == InLumi ? fb.lumiTree() :
195  fb.runTree()));
196  fillSelectedItemList(branchType, theInputTree);
197  }
198  initializedFromInput_ = true;
199  }
200  ++inputFileCount_;
202  }
int i
Definition: DBlmapReader.cc:9
BranchType
Definition: BranchType.h:11
void fillSelectedItemList(BranchType branchtype, TTree *theInputTree)
void beginInputFile(FileBlock const &fb)
OutputItemListArray const& edm::PoolOutputModule::selectedOutputItemList ( ) const
inline
bool edm::PoolOutputModule::shouldWeCloseFile ( ) const
protectedvirtual

allow inheriting classes to override but still be able to call this method in the overridden version

Reimplemented from edm::OutputModule.

Reimplemented in edm::TimeoutPoolOutputModule.

Definition at line 259 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by edm::TimeoutPoolOutputModule::shouldWeCloseFile().

259 { return rootOutputFile_->shouldWeCloseFile(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
int const& edm::PoolOutputModule::splitLevel ( ) const
inline

Definition at line 37 of file PoolOutputModule.h.

References splitLevel_.

Referenced by fillSelectedItemList().

37 {return splitLevel_;}
void edm::PoolOutputModule::startEndFile ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 244 of file PoolOutputModule.cc.

244 { }
int const& edm::PoolOutputModule::treeMaxVirtualSize ( ) const
inline

Definition at line 39 of file PoolOutputModule.h.

References treeMaxVirtualSize_.

39 {return treeMaxVirtualSize_;}
int const& edm::PoolOutputModule::whyNotFastClonable ( ) const
inline

Definition at line 46 of file PoolOutputModule.h.

References whyNotFastClonable_.

Referenced by edm::RootOutputFile::beginInputFile().

void edm::PoolOutputModule::write ( EventPrincipal const &  e)
protectedvirtual

Implements edm::OutputModule.

Reimplemented in edm::TimeoutPoolOutputModule.

Definition at line 222 of file PoolOutputModule.cc.

References edm::EventPrincipal::id(), rootOutputFile_, and statusFileName_.

Referenced by edm::TimeoutPoolOutputModule::write().

222  {
223  rootOutputFile_->writeOne(e);
224  if (!statusFileName_.empty()) {
225  std::ofstream statusFile(statusFileName_.c_str());
226  statusFile << e.id() << " time: " << std::setprecision(3) << TimeOfDay() << '\n';
227  statusFile.close();
228  }
229  }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeBranchIDListRegistry ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 255 of file PoolOutputModule.cc.

References rootOutputFile_.

255 { rootOutputFile_->writeBranchIDListRegistry(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeFileFormatVersion ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 247 of file PoolOutputModule.cc.

References rootOutputFile_.

247 { rootOutputFile_->writeFileFormatVersion(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeFileIdentifier ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 248 of file PoolOutputModule.cc.

References rootOutputFile_.

248 { rootOutputFile_->writeFileIdentifier(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeIndexIntoFile ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 249 of file PoolOutputModule.cc.

References rootOutputFile_.

249 { rootOutputFile_->writeIndexIntoFile(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeLuminosityBlock ( LuminosityBlockPrincipal const &  lb)
privatevirtual

Implements edm::OutputModule.

Definition at line 231 of file PoolOutputModule.cc.

References edm::LuminosityBlockPrincipal::id(), edm::LuminosityBlockID::luminosityBlock(), rootOutputFile_, and edm::LuminosityBlockID::run().

231  {
232  rootOutputFile_->writeLuminosityBlock(lb);
233  Service<JobReport> reportSvc;
234  reportSvc->reportLumiSection(lb.id().run(), lb.id().luminosityBlock());
235  }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeParameterSetRegistry ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 252 of file PoolOutputModule.cc.

References rootOutputFile_.

252 { rootOutputFile_->writeParameterSetRegistry(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeParentageRegistry ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 254 of file PoolOutputModule.cc.

References rootOutputFile_.

254 { rootOutputFile_->writeParentageRegistry(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeProcessConfigurationRegistry ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 250 of file PoolOutputModule.cc.

References rootOutputFile_.

250 { rootOutputFile_->writeProcessConfigurationRegistry(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeProcessHistoryRegistry ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 251 of file PoolOutputModule.cc.

References rootOutputFile_.

251 { rootOutputFile_->writeProcessHistoryRegistry(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeProductDependencies ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 256 of file PoolOutputModule.cc.

References rootOutputFile_.

256 { rootOutputFile_->writeProductDependencies(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeProductDescriptionRegistry ( )
privatevirtual

Reimplemented from edm::OutputModule.

Definition at line 253 of file PoolOutputModule.cc.

References rootOutputFile_.

253 { rootOutputFile_->writeProductDescriptionRegistry(); }
boost::scoped_ptr< RootOutputFile > rootOutputFile_
void edm::PoolOutputModule::writeRun ( RunPrincipal const &  r)
privatevirtual

Implements edm::OutputModule.

Definition at line 237 of file PoolOutputModule.cc.

References rootOutputFile_, and edm::RunPrincipal::run().

237  {
238  rootOutputFile_->writeRun(r);
239  Service<JobReport> reportSvc;
240  reportSvc->reportRunNumber(r.run());
241  }
boost::scoped_ptr< RootOutputFile > rootOutputFile_

Member Data Documentation

AuxItemArray edm::PoolOutputModule::auxItems_
private

Definition at line 128 of file PoolOutputModule.h.

Referenced by auxItems(), and fillSelectedItemList().

std::string edm::PoolOutputModule::basketOrder_
private

Definition at line 138 of file PoolOutputModule.h.

Referenced by basketOrder().

int const edm::PoolOutputModule::basketSize_
private

Definition at line 135 of file PoolOutputModule.h.

Referenced by basketSize().

std::string const edm::PoolOutputModule::catalog_
private

Definition at line 132 of file PoolOutputModule.h.

Referenced by catalog().

unsigned int edm::PoolOutputModule::childIndex_
private

Definition at line 146 of file PoolOutputModule.h.

Referenced by doOpenFile(), and postForkReacquireResources().

int const edm::PoolOutputModule::compressionLevel_
private

Definition at line 134 of file PoolOutputModule.h.

Referenced by compressionLevel().

DropMetaData edm::PoolOutputModule::dropMetaData_
private

Definition at line 141 of file PoolOutputModule.h.

Referenced by dropMetaData(), and PoolOutputModule().

int const edm::PoolOutputModule::eventAutoFlushSize_
private

Definition at line 136 of file PoolOutputModule.h.

Referenced by eventAutoFlushSize().

std::string const edm::PoolOutputModule::fileName_
private

Definition at line 130 of file PoolOutputModule.h.

Referenced by fileName().

bool edm::PoolOutputModule::initializedFromInput_
private

Definition at line 143 of file PoolOutputModule.h.

Referenced by respondToOpenInputFile().

int edm::PoolOutputModule::inputFileCount_
private

Definition at line 145 of file PoolOutputModule.h.

Referenced by doOpenFile(), inputFileCount(), and respondToOpenInputFile().

std::string const edm::PoolOutputModule::logicalFileName_
private

Definition at line 131 of file PoolOutputModule.h.

Referenced by logicalFileName().

unsigned int const edm::PoolOutputModule::maxFileSize_
private

Definition at line 133 of file PoolOutputModule.h.

Referenced by maxFileSize().

std::string const edm::PoolOutputModule::moduleLabel_
private
unsigned int edm::PoolOutputModule::numberOfDigitsInIndex_
private

Definition at line 147 of file PoolOutputModule.h.

Referenced by doOpenFile(), and postForkReacquireResources().

int edm::PoolOutputModule::outputFileCount_
private

Definition at line 144 of file PoolOutputModule.h.

Referenced by doOpenFile().

bool edm::PoolOutputModule::overrideInputFileSplitLevels_
private

Definition at line 148 of file PoolOutputModule.h.

Referenced by fillSelectedItemList(), and overrideInputFileSplitLevels().

boost::scoped_ptr<RootOutputFile> edm::PoolOutputModule::rootOutputFile_
private
RootServiceChecker edm::PoolOutputModule::rootServiceChecker_
private

Definition at line 127 of file PoolOutputModule.h.

OutputItemListArray edm::PoolOutputModule::selectedOutputItemList_
private

Definition at line 129 of file PoolOutputModule.h.

Referenced by fillSelectedItemList(), and selectedOutputItemList().

int const edm::PoolOutputModule::splitLevel_
private

Definition at line 137 of file PoolOutputModule.h.

Referenced by splitLevel().

std::string edm::PoolOutputModule::statusFileName_
private

Definition at line 150 of file PoolOutputModule.h.

Referenced by PoolOutputModule(), and write().

int const edm::PoolOutputModule::treeMaxVirtualSize_
private

Definition at line 139 of file PoolOutputModule.h.

Referenced by treeMaxVirtualSize().

int edm::PoolOutputModule::whyNotFastClonable_
private

Definition at line 140 of file PoolOutputModule.h.

Referenced by PoolOutputModule(), and whyNotFastClonable().