CMS 3D CMS Logo

Functions | Variables
storageSize.cc File Reference
#include <iostream>
#include <boost/program_options.hpp>
#include "TClass.h"
#include "TBufferFile.h"
#include "FWCore/FWLite/interface/FWLiteEnabler.h"
#include "FWCore/Utilities/interface/Exception.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Variables

static char const *const kClassNameOpt = "className"
 
static char const *const kHelpCommandOpt = "help,h"
 
static char const *const kHelpOpt = "help"
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Definition at line 30 of file storageSize.cc.

30  {
31  std::string descString(argv[0]);
32  descString += " [options] [--";
33  descString += kClassNameOpt;
34  descString +=
35  "] class_name"
36  "\n The program dumps information about how much storage space is needed to store the class"
37  "\nAllowed options";
38  boost::program_options::options_description desc(descString);
39  desc.add_options()(kHelpCommandOpt, "show this help message")(kClassNameOpt, "name of class");
40 
41  boost::program_options::positional_options_description p;
42  p.add(kClassNameOpt, 1);
43 
44  boost::program_options::variables_map vm;
45  try {
46  store(boost::program_options::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
47  notify(vm);
48  } catch (boost::program_options::error const& iException) {
49  std::cerr << "failed to parse command line \n" << iException.what() << "\n";
50  return 1;
51  }
52 
53  if (vm.count(kHelpOpt)) {
54  std::cout << desc << std::endl;
55  return 0;
56  }
57 
58  if (!vm.count(kClassNameOpt)) {
59  std::cerr << "no class name given\n";
60  return 1;
61  }
62 
63  std::string className(vm[kClassNameOpt].as<std::string>());
64 
66 
67  TClass* cls = TClass::GetClass(className.c_str());
68  if (nullptr == cls) {
69  std::cerr << "class '" << className << "' is unknown by ROOT\n";
70  return 1;
71  }
72 
73  void* objInstance = cls->New();
74  if (nullptr == objInstance) {
75  std::cerr << "unable to create a default instance of the class " << className;
76  return 1;
77  }
78 
79  TBufferFile bf(TBuffer::kWrite);
80 
81  gDebug = 3;
82  cls->WriteBuffer(bf, objInstance);
83 
84  gDebug = 0;
85  std::cout << "Total amount stored: " << bf.Length() << " bytes" << std::endl;
86  std::cout << "\nNOTE: add 4 bytes for each 'has written' value because of a bug in ROOT's printout of the accounting"
87  << "\n Each class (inheriting or as member data) has metadata an overhead of 10 bytes" << std::endl;
88  return 0;
89 } catch (cms::Exception const& e) {
90  std::cerr << e.explainSelf() << std::endl;
91  return 1;
92 } catch (std::exception const& e) {
93  std::cerr << e.what() << std::endl;
94  return 1;
95 }

References dir2webdir::argc, cmsBatch::argv, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, className(), gather_cfg::cout, submitPVResolutionJobs::desc, FWLiteEnabler::enable(), relativeConstraints::error, kClassNameOpt, kHelpCommandOpt, kHelpOpt, AlcaSiPixelAliHarvester0T_cff::options, AlCaHLTBitMon_ParallelJobs::p, writedatasetfile::run, and AlCaHLTBitMon_QueryRunRegistry::string.

Variable Documentation

◆ kClassNameOpt

char const* const kClassNameOpt = "className"
static

Definition at line 26 of file storageSize.cc.

Referenced by main().

◆ kHelpCommandOpt

char const* const kHelpCommandOpt = "help,h"
static

Definition at line 28 of file storageSize.cc.

Referenced by main().

◆ kHelpOpt

char const* const kHelpOpt = "help"
static

Definition at line 27 of file storageSize.cc.

Referenced by main().

cmsBatch.argv
argv
Definition: cmsBatch.py:279
dir2webdir.argc
argc
Definition: dir2webdir.py:39
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
relativeConstraints.error
error
Definition: relativeConstraints.py:53
kClassNameOpt
static char const *const kClassNameOpt
Definition: storageSize.cc:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
kHelpOpt
static char const *const kHelpOpt
Definition: storageSize.cc:27
FWLiteEnabler::enable
static void enable()
enable automatic library loading
Definition: FWLiteEnabler.cc:46
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
writedatasetfile.run
run
Definition: writedatasetfile.py:27
kHelpCommandOpt
static char const *const kHelpCommandOpt
Definition: storageSize.cc:28
AlcaSiPixelAliHarvester0T_cff.options
options
Definition: AlcaSiPixelAliHarvester0T_cff.py:42
className
std::string className(const T &t)
Definition: ClassName.h:31
cms::Exception
Definition: Exception.h:70
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37