CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripNullKey.cc
Go to the documentation of this file.
1 // Last commit: $Id: SiStripNullKey.cc,v 1.3 2007/03/26 10:12:43 bainbrid Exp $
2 
5 #include <iomanip>
6 
7 // -----------------------------------------------------------------------------
8 //
10 
11 // -----------------------------------------------------------------------------
12 //
14  SiStripKey& temp = const_cast<SiStripKey&>(input);
15  if ( &dynamic_cast<SiStripNullKey&>(temp) ) { return true; }
16  else { return false; }
17 }
18 
19 // -----------------------------------------------------------------------------
20 //
22  return isEqual(input);
23 }
24 
25 // -----------------------------------------------------------------------------
26 //
27 bool SiStripNullKey::isValid() const {
28  return false;
29 }
30 
31 // -----------------------------------------------------------------------------
32 //
33 bool SiStripNullKey::isValid( const sistrip::Granularity& gran ) const {
34  return false;
35 }
36 
37 // -----------------------------------------------------------------------------
38 //
40  return true;
41 }
42 
43 // -----------------------------------------------------------------------------
44 //
46  return true;
47 }
48 
49 // -----------------------------------------------------------------------------
50 //
52 
53 // -----------------------------------------------------------------------------
54 //
56 
57 // -----------------------------------------------------------------------------
58 //
60 
61 // -----------------------------------------------------------------------------
62 //
64 
65 // -----------------------------------------------------------------------------
66 //
67 void SiStripNullKey::print( std::stringstream& ss ) const {
68  ss << " [SiStripNullKey::print]" << std::endl
69  << std::hex
70  << " 32-bit key : 0x"
71  << std::setfill('0')
72  << std::setw(8) << key() << std::endl
73  << std::setfill(' ')
74  << std::dec
75  << " Directory : " << path() << std::endl
76  << " Granularity : "
78  << " Channel : " << channel() << std::endl
79  << " isValid : " << isValid();
80 }
81 
82 // -----------------------------------------------------------------------------
83 //
84 std::ostream& operator<< ( std::ostream& os, const SiStripNullKey& input ) {
85  std::stringstream ss;
86  input.print(ss);
87  os << ss.str();
88  return os;
89 }
virtual void print(std::stringstream &ss) const
bool isEqual(const SiStripKey &) const
bool isConsistent(const SiStripKey &) const
static std::string granularity(const sistrip::Granularity &)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
const uint32_t & key() const
Definition: SiStripKey.h:126
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:128
void initGranularity()
Base utility class that identifies a position within a logical structure of the strip tracker...
Definition: SiStripKey.h:24
const std::string & path() const
Definition: SiStripKey.h:127
tuple input
Definition: collect_tpl.py:10
bool isValid() const
const uint16_t & channel() const
Definition: SiStripKey.h:129
Concrete implementation of abstract base, signifying null values or an &quot;unknown&quot; position or view...
bool isInvalid() const