NAMD
Public Member Functions | Public Attributes | List of all members
CollectionMaster::CollectVectorSequenceDcdSelection Class Reference

#include <CollectionMaster.h>

Inheritance diagram for CollectionMaster::CollectVectorSequenceDcdSelection:
CollectionMaster::CollectVectorSequence

Public Member Functions

void submitData (CollectVectorMsg *msg, int max_index)
 
CollectVectorInstanceDcdSelectionremoveReady (void)
 
 CollectVectorSequenceDcdSelection (void)
 
 CollectVectorSequenceDcdSelection (int _index)
 
- Public Member Functions inherited from CollectionMaster::CollectVectorSequence
void submitData (CollectVectorMsg *msg, int max_index)
 
void enqueue (int seq, Lattice &lattice)
 
CollectVectorInstanceremoveReady (void)
 
void block ()
 
void unblock ()
 
 CollectVectorSequence ()
 

Public Attributes

ResizeArray< CollectVectorInstanceDcdSelection * > data
 
int index
 
int blocked
 
- Public Attributes inherited from CollectionMaster::CollectVectorSequence
ResizeArray< int > queue
 
ResizeArray< Latticelatqueue
 
int blocked
 

Detailed Description

Definition at line 332 of file CollectionMaster.h.

Constructor & Destructor Documentation

◆ CollectVectorSequenceDcdSelection() [1/2]

CollectionMaster::CollectVectorSequenceDcdSelection::CollectVectorSequenceDcdSelection ( void  )
inline

◆ CollectVectorSequenceDcdSelection() [2/2]

CollectionMaster::CollectVectorSequenceDcdSelection::CollectVectorSequenceDcdSelection ( int  _index)
inline

Member Function Documentation

◆ removeReady()

CollectVectorInstanceDcdSelection* CollectionMaster::CollectVectorSequenceDcdSelection::removeReady ( void  )
inline

Definition at line 353 of file CollectionMaster.h.

References blocked, data, ResizeArray< Elem >::del(), CollectionMaster::CollectVectorSequence::latqueue, CollectionMaster::CollectVectorInstance::lattice, CollectionMaster::CollectVectorSequence::queue, CollectionMaster::CollectVectorInstance::ready(), CollectionMaster::CollectVectorInstance::seq, and ResizeArray< Elem >::size().

Referenced by CollectionMaster::enqueuePositionsDcdSelection(), and CollectionMaster::receivePositionsDcdSelection().

354  {
355  CollectVectorInstanceDcdSelection *o = 0;
356  if ( queue.size() && ! blocked )
357  {
358  int seq = queue[0];
359  CollectVectorInstanceDcdSelection **c = data.begin();
360  CollectVectorInstanceDcdSelection **c_e = data.end();
361  for( ; c != c_e && (*c)->seq != seq; ++c );
362  if ( c != c_e && (*c)->ready() )
363  {
364  o = *c;
365  o->lattice = latqueue[0];
366  queue.del(0,1);
367  latqueue.del(0,1);
368  }
369  }
370  return o;
371  }
int size(void) const
Definition: ResizeArray.h:131
ResizeArray< CollectVectorInstanceDcdSelection * > data
void del(int index, int num=1)
Definition: ResizeArray.h:108

◆ submitData()

void CollectionMaster::CollectVectorSequenceDcdSelection::submitData ( CollectVectorMsg msg,
int  max_index 
)
inline

Definition at line 335 of file CollectionMaster.h.

References data, CollectionMaster::CollectVectorInstance::notfree(), CollectVectorMsg::seq, and CollectionMaster::CollectVectorInstance::seq.

Referenced by CollectionMaster::receivePositionsDcdSelection().

336  {
337  int seq = msg->seq;
338  CollectVectorInstanceDcdSelection **c = data.begin();
339  CollectVectorInstanceDcdSelection **c_e = data.end();
340  for( ; c != c_e && (*c)->seq != seq; ++c );
341  if ( c == c_e )
342  {
343  c = data.begin();
344  for( ; c != c_e && (*c)->notfree(); ++c );
345  if ( c == c_e ) {
346  data.add(new CollectVectorInstanceDcdSelection(seq));
347  c = data.end() - 1;
348  }
349  (*c)->reset(seq);
350  }
351  (*c)->append(msg, max_index);
352  }
ResizeArray< CollectVectorInstanceDcdSelection * > data

Member Data Documentation

◆ blocked

int CollectionMaster::CollectVectorSequenceDcdSelection::blocked

Definition at line 377 of file CollectionMaster.h.

Referenced by removeReady().

◆ data

ResizeArray<CollectVectorInstanceDcdSelection*> CollectionMaster::CollectVectorSequenceDcdSelection::data

Definition at line 375 of file CollectionMaster.h.

Referenced by removeReady(), and submitData().

◆ index

int CollectionMaster::CollectVectorSequenceDcdSelection::index

Definition at line 376 of file CollectionMaster.h.

Referenced by CollectionMaster::receivePositionsDcdSelection().


The documentation for this class was generated from the following file: