Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

NTBaseCut.C

Go to the documentation of this file.
00001 
00014 #include "jbltools/sfh/NTBaseCut.h"
00015 
00016 #include <iostream>
00017 
00018 static const char *ident="@(#)$Id: NTBaseCut.C,v 1.4 2005/07/08 15:01:35 blist Exp $";
00019 
00020 NTBaseCut::NTBaseCut (const std::string& name_) 
00021 : BaseCut (name_),
00022   iter (0), 
00023   offset (0)
00024 {        
00025 #if (DEBUG>0) 
00026   std::cout << "NTBaseCut: created '" << getName() << "'\n";
00027 #endif
00028 }
00029 
00030 NTBaseCut::NTBaseCut (const std::string& name_, const IntFun *iter_) 
00031 : BaseCut (name_ + (iter_ ? str('[')+iter_->getName()+']' : "")),
00032   iter (iter_), 
00033   offset (0)
00034 {        
00035 #if (DEBUG>0) 
00036   std::cout << "NTBaseCut: created '" << getName() << "'\n";
00037 #endif
00038 }
00039 
00040 NTBaseCut::NTBaseCut (const std::string& name_, int offset_) 
00041 : BaseCut (name_ + (offset_>=0 ? str('[')+str(offset_)+']' : "")),
00042   iter (0), 
00043   offset (offset_>=0 ? offset_ : 0)
00044 {        
00045 #if (DEBUG>0) 
00046   std::cout << "NTBaseCut: created '" << getName() << "'\n";
00047 #endif
00048 }
00049                                
00050 std::string NTBaseCut::getBaseName() const {
00051   std::string result = getName();
00052   // find first occurence of "[", and erase everything from there on
00053   std::string::size_type pos = result.find('[');
00054   if (pos != std::string::npos) result.erase(pos);
00055   return result;
00056 }

Generated on Thu Oct 26 12:52:58 2006 for SFH by doxygen 1.3.2