LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
util::FileCatalogMetadataExtras::PerFileMetadata Struct Reference

#include "FileCatalogMetadataExtras.h"

Public Member Functions

 PerFileMetadata ()
 
void fillMetadata (std::multimap< std::string, std::string > &md)
 

Public Attributes

std::set< art::RunNumber_tfRunNumbers
 
std::set< art::SubRunNumber_tfSubRunNumbers
 
std::set< std::string > fParents
 
art::EventNumber_t fFirstEvent
 
art::EventNumber_t fLastEvent
 
unsigned int fEventCount
 
time_t fStartTime
 
time_t fEndTime
 
std::multimap< std::string, std::string > fNVPairs
 

Detailed Description

Definition at line 109 of file FileCatalogMetadataExtras.h.

Constructor & Destructor Documentation

util::FileCatalogMetadataExtras::PerFileMetadata::PerFileMetadata ( )
inline

Member Function Documentation

void util::FileCatalogMetadataExtras::PerFileMetadata::fillMetadata ( std::multimap< std::string, std::string > &  md)

Definition at line 527 of file FileCatalogMetadataExtras_service.cc.

References f, and n.

Referenced by util::FileCatalogMetadataExtras::addPerFileMetadata(), and PerFileMetadata().

528 {
529  for(auto run : fRunNumbers) {
530  std::ostringstream ostr;
531  ostr << run;
532  md.insert(std::pair<std::string, std::string>("run", ostr.str()));
533  }
534  for(auto subrun : fSubRunNumbers) {
535  std::ostringstream ostr;
536  ostr << subrun;
537  md.insert(std::pair<std::string, std::string>("subRun", ostr.str()));
538  }
539  {
540  std::ostringstream ostr;
541  ostr << fFirstEvent;
542  md.insert(std::pair<std::string, std::string>("firstEvent", ostr.str()));
543  }
544  {
545  std::ostringstream ostr;
546  ostr << fLastEvent;
547  md.insert(std::pair<std::string, std::string>("lastEvent", ostr.str()));
548  }
549  {
550  std::ostringstream ostr;
551  ostr << fEventCount;
552  md.insert(std::pair<std::string, std::string>("eventCount", ostr.str()));
553  }
554  {
555  std::ostringstream ostr;
556  ostr << fStartTime;
557  md.insert(std::pair<std::string, std::string>("startTime", ostr.str()));
558  }
559  {
560  std::ostringstream ostr;
561  ostr << fEndTime;
562  md.insert(std::pair<std::string, std::string>("endTime", ostr.str()));
563  }
564  for(auto parent : fParents) {
565  size_t n = parent.find_last_of('/');
566  size_t f = (n == std::string::npos ? 0 : n+1);
567  md.insert(std::pair<std::string, std::string>("parent", parent.substr(f)));
568  }
569  for(auto const& nvp : fNVPairs)
570  md.insert(nvp);
571 }
TFile f
Definition: plotHisto.C:6
std::multimap< std::string, std::string > fNVPairs
Char_t n[5]

Member Data Documentation

time_t util::FileCatalogMetadataExtras::PerFileMetadata::fEndTime
unsigned int util::FileCatalogMetadataExtras::PerFileMetadata::fEventCount
art::EventNumber_t util::FileCatalogMetadataExtras::PerFileMetadata::fFirstEvent
art::EventNumber_t util::FileCatalogMetadataExtras::PerFileMetadata::fLastEvent
std::multimap<std::string, std::string> util::FileCatalogMetadataExtras::PerFileMetadata::fNVPairs
std::set<std::string> util::FileCatalogMetadataExtras::PerFileMetadata::fParents
std::set<art::RunNumber_t> util::FileCatalogMetadataExtras::PerFileMetadata::fRunNumbers
time_t util::FileCatalogMetadataExtras::PerFileMetadata::fStartTime
std::set<art::SubRunNumber_t> util::FileCatalogMetadataExtras::PerFileMetadata::fSubRunNumbers

The documentation for this struct was generated from the following files: