CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Validation/RecoJets/src/NameScheme.cc

Go to the documentation of this file.
00001 #include "Validation/RecoJets/interface/NameScheme.h"
00002 
00003 NameScheme::NameScheme():
00004   name_("Default"),
00005   link_("_")
00006 {
00007 }
00008 
00009 NameScheme::NameScheme(const char* name):
00010   name_(name),
00011   link_("_")
00012 {
00013 }
00014 
00015 NameScheme::NameScheme(const char* name, const char* link):
00016   name_(name),
00017   link_(link)
00018 {
00019 }
00020 
00021 NameScheme::~NameScheme()
00022 {
00023 
00024 }
00025 
00026 TString
00027 NameScheme::name(const int i)
00028 {
00029   TString namestr( name_ );
00030   namestr += link_;
00031   namestr += i;
00032   return namestr;
00033 }
00034 
00035 TString
00036 NameScheme::name(const char* name)
00037 {
00038   TString namestr( name_ );
00039   namestr += link_;
00040   namestr += name;
00041   return namestr;
00042 }
00043 
00044 TString
00045 NameScheme::name(const char* name, const int i)
00046 {
00047   TString namestr( name_ );
00048   namestr += link_;
00049   namestr += name;
00050   namestr += "_";
00051   namestr += i;
00052   return namestr;
00053 }
00054 
00055 TString
00056 NameScheme::name(const char* name, const int i, const int j)
00057 {
00058   TString namestr( name_ );
00059   namestr += link_;
00060   namestr += name;
00061   namestr += "_";
00062   namestr += i;
00063   namestr += "_";
00064   namestr += j;
00065   return namestr;
00066 }
00067 
00068 TString
00069 NameScheme::name(ofstream& file, const char* name)
00070 {
00071   TString namestr( name_ );
00072   namestr += link_;
00073   namestr += name;
00074 
00075   file << namestr << "\n";
00076   return namestr;
00077 }
00078 
00079 TString
00080 NameScheme::name(ofstream& file, const char* name, const int i)
00081 {
00082   TString namestr( name_ );
00083   namestr += link_;
00084   namestr += name;
00085   namestr += "_";
00086   namestr += i;
00087 
00088   file << namestr << "\n";
00089   return namestr;
00090 }
00091 
00092 TString
00093 NameScheme::name(ofstream& file, const char* name, const int i, const int j)
00094 {
00095   TString namestr( name_ );
00096   namestr += link_;
00097   namestr += name;
00098   namestr += "_";
00099   namestr += i;
00100   namestr += "_";
00101   namestr += j;
00102 
00103   file << namestr << "\n";
00104   return namestr;
00105 }